package com.example.servletdemo.listner;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

//@WebListener
public class MyServletContextListener  implements ServletContextListener {
    private static final String TAG = "MyServletContextListene";

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println(TAG+" :ServletContext对象已创建");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println(TAG+" :ServletContext对象已销毁");
    }
}
